/*
 * $Id: TaskRequestInfoTag.java,v 1.1 2009/05/08 16:34:04 afaichun Exp $
 * 
 * Copyright (C) 2008 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.onwatch.xml.tag;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("info")
public class TaskRequestInfoTag {
	private boolean debug = false;
	private String requestor = null;
	private String exeScriptAs = null;
	
	public TaskRequestInfoTag() {}
	
	public TaskRequestInfoTag(String requestor, String exeScriptAs){
		this.requestor = requestor;
		this.exeScriptAs = exeScriptAs;
	}
	
	public boolean isDebug() {
		return debug;
	}
	
	public void markAsDebug() {
		debug = true;
	}

	public String getRequestor() {
		return requestor;
	}

	public void setRequestor(String requestor) {
		this.requestor = requestor;
	}

	public String getExeScriptAs() {
		return exeScriptAs;
	}

	public void setExeScriptAs(String exeScriptAs) {
		this.exeScriptAs = exeScriptAs;
	}
	
	public String toString() {
		StringBuffer msg = new StringBuffer();
		msg.append(TaskRequestInfoTag.class.getName()).append(":\n");
		if(isDebug()) {
			msg.append("{debug: true").append("},");
		} else {
			msg.append("{debug: false").append("},");
		}
		msg.append("{requestor: ").append(getRequestor()).append("},");
		msg.append("{exeScriptAs: ").append(getExeScriptAs()).append("}");
		msg.append("\n");
		return msg.toString();
	}
}
